using System;
using UnityEngine;

[Serializable]
public class VPS : MonoBehaviour
{
	private Mesh mesh;

	public bool showFPS;

	public void Start()
	{
		GetComponent<GUIText>().material.color = Color.black;
	}

	public void LateUpdate()
	{
		if (!mesh)
		{
			mesh = (Mesh)UnityEngine.Object.FindObjectOfType(typeof(Mesh));
		}
		if (Time.frameCount % 5 != 0)
		{
			int num = (int)((float)mesh.vertexCount / Time.smoothDeltaTime / 1000f);
			GetComponent<GUIText>().text = "Vertices per second:\n" + num + "k";
			int num2 = (int)(1f / Time.smoothDeltaTime);
			if (showFPS)
			{
				GetComponent<GUIText>().text = GetComponent<GUIText>().text + ("\nFrames per second:\n" + num2);
			}
		}
	}

	public void Main()
	{
	}
}
